{% extends "admin_base.html" %}
{% block title %}明日方舟公开招募计算器后台{% endblock %}
{% block features %}
 {% for message in get_flashed_messages() %}
    <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message }}
    </div>
{% endfor %}
<div class="row">
    <div class="col-md-12">
        <form id="addform" action="{{url_for('admin_userEdit',id=data.id)}}" method="post">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
        <div class="ark-user">
        <ul>
            <li>
                <span>用户名:</span>
                <label>{{data.name}}</label>
            </li>
            <li>
                <span>邮箱:</span>
                <input type="text" name="email" required="required" class="ark-input" placeholder="输入邮箱地址" title="邮箱格式不对" pattern="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"  value="{{data.email}}">
            </li>
            {% if data.id != current_user.id %}
            <li>
                <span>角色:</span>
                <select class="ark-input" name="role">
                    {% if data.role==1 %}
                    <option value="1" selected>管理员</option>
                    <option value="0">用户</option>
                    {% else %}
                    <option value="1" >管理员</option>
                    <option value="0" selected>用户</option>
                    {% endif %}
                </select>
            </li>
            <li>
                <span>状态:</span>
                {% if data.status==1 %}
                <label class="radio-inline"><input type="radio" name="status" class="checkbox" checked value="1"> 正常</label>
                    <label class="radio-inline"><input type="radio" name="status" class="checkbox" value="0"> 禁用</label>
                {% else %}
                <label class="radio-inline">
                    <label class="radio-inline"><input type="radio" name="status" class="checkbox"  value="1"> 正常</label>
                    <label class="radio-inline"><input type="radio" name="status" class="checkbox" checked value="0"> 禁用</label>
                </label>
                {% endif %}
            </li>
            {% endif  %}
            <li>
                <span></span>
                <input type="submit" class="btn btn-primary" value="更 新">
                <input value="返 回" type="button" class="btn btn-primary" onclick="javascript:history.back()" >
            </li>
        </ul>
        </div>
    </form>
    </div>
</div>


{% endblock %}